package com.mvp.base.model;

/**
 * Created by zhangyuncai on 2018/11/19.
 */
public class ResultModel<T> extends BaseModel {
    private int result;
    private String msg;
    private T data;
    private int count_unread;

    public boolean isSuccess() {
        return result == 1;
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResultModel{" +
                "result=" + result +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", count_unread=" + count_unread +
                '}';
    }

    public int getCount_unread() {
        return count_unread;
    }
}
